package com.ssy.lingxi.after.sale.model.constant;

import com.ssy.lingxi.common.language.LanguageHolder;

/**
 * 支付规则配置枚举（取值平台参数配置，数据初始化定死）
 * @author 伍将
 * @date 2020/12/25
 * @version 2.0.0
 */
public enum PayRuleConfigurationEnum {

    /**
     * 平台代收
     */
    PLATFORM(1L, "平台代收"),
    /**
     * 会员直接到账
     */
    MEMBER(2L, "会员直接到账");

    private final Long code;
    private final String message;

    PayRuleConfigurationEnum(Long code, String message) {
        this.code = code;
        this.message = message;
    }

    public Long getCode() {
        return code;
    }

    public String getMessage() {
        return LanguageHolder.getName(this.getDeclaringClass(), Integer.parseInt(this.getCode().toString()));
    }
}
